import React, { Component } from 'react';
import pic from "../assets/1.png"
import "../styles/MyList.scss"

class MyList extends Component {
  constructor(props) {
    super(props)
    this.state = {
      list: [
        { pic, text: '护肤' }, { pic, text: '彩妆' }, { pic, text: '香氛' }
        , { pic, text: '进口酒' }, { pic, text: '国产酒' }, { pic, text: '精品奢货' }
        , { pic, text: '食品百货' }, { pic, text: '母婴专区' }, { pic, text: '直播专区' }
        , { pic, text: '特卖专场' }
      ]
    }
  }

  render() {
    return (
      <div className='list'>
        <p>1分抵1元。请您点击此处查看《购物须知》</p>
        <div className='tasklist'>
          {
            this.state.list.map((item, index) => {
              return (
                <div className="item" key={index}>
                  <img src={item.pic} alt="" />
                  <div>{item.text}</div>
                </div>

              )
            })
          }
        </div>

      </div>
    );
  }
}

export default MyList;